% Simple overlay script. Replace directories with your own images and
% execute with F5. Color range of overlay needs to be adjusted manually.

% h.smit@erasmusmc.nl

%read in original image and map. Replace dirs with your own imagedir.
MRimagepath = 'C:\Users\Henk Smit\Desktop\MRData\120606CarotidSpecimen\specimen_plaque_henk_t2_mapping_29\010\New folder\0001.dcm';
mappath='C:\Users\Henk Smit\Desktop\MRData\120606CarotidSpecimen\specimen_plaque_henk_t2_mapping_29\010\New folder\0001T2map_Regularized.dcm';

%Logistics
info1 = dicominfo(MRimagepath);
info2 = dicominfo(mappath);
I = dicomread(info1);
M = dicomread(info2);
Iint=uint16(I);
Mint=uint16(M);

%Create overlay. Color range can be adjusted manually between the []
figure('Name','Overlay with M map (milliseconds)', 'position', [800 600 500 500]);
sc(Mint,[00 200], jet,sc(Iint, [0 13000],gray),Mint==0);
colorbar('south','XColor','white');



